function ValidData() {
	var username, password;
	username = document.getElementById("username").value;
	password = document.getElementById("password").value;
	if (username == null || username == "") {
		document.getElementById("error").innerHTML = "Username must not be empty";
		document.getElementsByTagName("LI")[0].removeAttribute("style");
		return false;
	} else if (password == null || password == "") {
		document.getElementById("error").innerHTML = "Password must not be empty";
		document.getElementsByTagName("LI")[0].removeAttribute("style");
		return false;

	} else {
		return true;
	}

}
function addRowToTable(tabelID) {
	var tbl = document.getElementById(tabelID);
	var lastRow = tbl.rows.length;
	var iteration = lastRow;
	var row;
	var cellCount = tbl.rows[0].cells.length;
	// insert cell
	var cellLeft;
	var textNode;
	for ( var j = lastRow; j <= 14; j++) {
		row = tbl.insertRow(j);
		for ( var i = 0; i < cellCount; i++) {
			cellLeft = row.insertCell(i);
			if (i == 0) {
				textNode = document.createTextNode(j);
			} else {
				textNode = document.createTextNode("");

			}
			cellLeft.appendChild(textNode);

		}
	}

	// right cell
	/*
	 * var cellRight = row.insertCell(1); var el =
	 * document.createElement('input'); el.type = 'text'; el.name = 'txtRow' +
	 * iteration; el.id = 'txtRow' + iteration; el.size = 40;
	 * cellRight.appendChild(el); var cellRight = row.insertCell(1); var el =
	 * document.createElement('input'); el.type = 'text'; el.name = 'txtRow' +
	 * iteration; el.id = 'txtRow' + iteration; el.size = 40;
	 * cellRight.appendChild(el);
	 */
}
function removeRowFromTable() {
	var tbl = document.getElementById('tblSample');
	var lastRow = tbl.rows.length;
	if (lastRow > 2)
		tbl.deleteRow(lastRow - 1);
}
function AddDatainRow() {
	var txtDate, txtParty, txtRef, txtAmount, txtRemark;
	txtDate = document.getElementById("").value;
	txtParty = document.getElementById("").value;
	txtRef = document.getElementById("").value;
	txtAmount = document.getElementById("").value;
	txtRemark = document.getElementById("").value;

	if (txtDate == "" || txtParty == "" || txtRef == "" || txtAmount == null
			|| txtRemark == null) {

	}
}
function Demo() {
	if (Validation()) {
		alert("ok");
	}
}
function Validation() {
	var allInputs = document.getElementsByTagName('input');
	for ( var i = 0; i < allInputs.length; i++) {
		if (allInputs[i].title == "checked") {
			if (allInputs[i].value == "") {
				idname = allInputs[i].id;
				idname = idname.charAt(0).toUpperCase() + idname.slice(1);
				document.getElementById("errorlabel").innerHTML = idname
						+ " must not be empty";
				isTrue = false;
				break;
			} else {
				document.getElementById("errorlabel").value = "";
				isTrue = true;
			}
		}
	}
	return isTrue;
}
/* Jquery Code Begin */
$(document).ready(function() {

	$(".homeMenu").click(function() {
		$.get("MenuPage/" + this.id + ".html", function(data) {
			$("#middleDiv").html(data);
		});

	});
	$(".homeMenu1").click(function() {
		$("#InnerBody").load("MasterPage/" + this.id + ".jsp");
 
	});
});
/* Jquery Code End */